package task.manager;

import junit.framework.Assert;
import junit.framework.TestCase;

/**
 * Test class for the Task class.
 * 
 * @author RUSKIN, MHUET
 * @version 1
 */
public class TaskTest extends TestCase {

	// Tasks to be compared.
	Task task1;
	Task task2;
	
	/**
	 * Greg's test method for {@link task.manager.Task#isAfter(int, int, int)}.
	 */
	public void testIsAfter() {
		
		task1 = new Task("task1",1,1,1,1,1);
		task2 = new Task("task2",2,2,2,2,2);
		Assert.assertEquals(task1.getTitle(),"task1");
		Assert.assertEquals(task2.getTitle(),"task2");
		Assert.assertEquals(task1.isAfter(0, 0, 0), true);
		Assert.assertEquals(task1.isAfter(2, 2, 2), false);
		Assert.assertEquals(task2.isAfter(1, 1, 1), true);
		Assert.assertEquals(task2.isAfter(3, 3, 3), false);
		
	} // End of testIsAfter() method.
	
public void testGetTimeString() {
		
		task1 = new Task("task1",1,1,1,1,1);
		task2 = new Task("task2",1,1,1,1,10);
		Assert.assertEquals(task1.getTimeString(),"1:01");
		Assert.assertEquals(task2.getTimeString(),"1:10");
		
	} // End of testGetTimeString() method.

} // End of TaskTest class.
